package com.zqs.controller.vo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
public class ExamAddBatchParam {
    @NotNull(message = "考试编号不能为空")
    private Integer examNum;

    @NotNull(message = "班级编号不能为空")
    private Integer classcNum;

    @NotNull(message = "学生列表不能为空")
    public List<ExamAddBatchStudent> students;

    @Data
    public static class ExamAddBatchStudent {
        @NotBlank(message = "学号不能为空")
        private String stuNum;

        @NotBlank(message = "学生姓名不能为空")
        private String stuName;

        @Size(min = 1, message = "成绩列表不能为空")
        private List<ExamAddBatchScore> scores;
    }

    @Data
    public static class ExamAddBatchScore {
        @NotBlank(message = "科目名称不能为空")
        private String subjectName;

        private Float score;

        private Integer schRank;

        private Integer classRank;
    }
}

